
# 带参数的装饰器 ：带一个参数
def info(func):
    def wrapper(args):
        print("[INFO]:调用{}()".format(func.__name__))
        return func(args)
    return wrapper


@info
def say_chinese(args):
    print("你好,{}".format(args))


say_chinese("带参数的装饰器函数")


print("="*60)


def info1(func):
    def wrapper(*args,**kwargs):
        print("[INFO]:调用{}()".format(func.__name__))
        return func(*args,**kwargs)
    return wrapper


@info1
def say(args1):
    print("hello {}!".format(args1))

@info1
def todo(x,y,z,m):
    print(x+y+z-m)


say("python")
todo(3,4,5,6)